/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PaginaPrincipal.java
 *
 * Created on 23/04/2010, 21:59:23
 */

package judlawei.gui;

import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;

/**
 * 
 * @author Aislan M. de Lima
 */
public class PaginaPrincipal extends JFrame {

    private JPanel Logotipo;
    private JPanel submeter;
    private JPanel visualizarDocumento;
    

    /** Creates new form PaginaPrincipal */
    public PaginaPrincipal() {

        initComponents();
        construirLayout();
    }

    public static Border criaTitledBorder(String nome){
        return BorderFactory.createTitledBorder(BorderFactory.createTitledBorder(""), 
                nome,TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
                new Font("Tahoma",0,11), Color.blue);
    }
    
    private void initComponents() {

        submeter = new Submeter();
        Logotipo = new Logotipo();
        visualizarDocumento = new VisualizarDocumento();

        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setTitle("JudLaw EI");
        submeter.setBorder(this.criaTitledBorder("Submeter"));
        visualizarDocumento.setBorder(this.criaTitledBorder("Visualizar Documento"));

        

        

        
    }// </editor-fold>//GEN-END:initComponents

        
    private void construirLayout(){
        GroupLayout layout = new GroupLayout(
                getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(layout.createParallelGroup(
                GroupLayout.Alignment.LEADING).addGroup(
                layout.createSequentialGroup().addContainerGap().addGroup(
                        layout.createParallelGroup(
                                GroupLayout.Alignment.TRAILING,
                                false).addComponent(visualizarDocumento,
                                        GroupLayout.Alignment.LEADING,
                                        GroupLayout.DEFAULT_SIZE,
                                        GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE).addComponent(submeter,
                                        GroupLayout.Alignment.LEADING,
                                        GroupLayout.DEFAULT_SIZE,
                                        GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE).addComponent(Logotipo,
                                        GroupLayout.Alignment.LEADING,
                                        GroupLayout.PREFERRED_SIZE,
                                        GroupLayout.DEFAULT_SIZE,
                                        GroupLayout.PREFERRED_SIZE))
                        .addContainerGap()));
        layout.setVerticalGroup(layout.createParallelGroup(
                GroupLayout.Alignment.LEADING).addGroup(
                layout.createSequentialGroup().addContainerGap().addComponent(
                        Logotipo, GroupLayout.PREFERRED_SIZE,
                        GroupLayout.DEFAULT_SIZE,
                        GroupLayout.PREFERRED_SIZE).addGap(18, 18,
                        18).addComponent(submeter,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE).addGap(18, 18,
                        18).addComponent(visualizarDocumento,
                                GroupLayout.PREFERRED_SIZE,
                                GroupLayout.DEFAULT_SIZE,
                                GroupLayout.PREFERRED_SIZE).addGap(71, 71,
                        71)));
        this.pack();
    }
    /**
     * @param args
     *            the command line arguments
     */
    public static void main(String args[]) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PaginaPrincipal().setVisible(true);
            }
        });
    }
    
}
